<html>
    <head>
        <style>
            #origin {
                width: 300px;
            }
        </style>
    </head>

    <script>
        var a = "\u0003br>\u0003br>\u0003br>\u0003br><br>"
        let b = a.replace("/\\u0003/g","b")
        let c = a.replace("\\u0003","<")
        // console.log(a)
        // console.log(b);
        // console.log(c);
        
        function replaceOne() {
            let oResult = document.getElementById("result1");
            let oOrigin = document.getElementById("origin");
            // console.log(oOrigin)
            let str_origin = oOrigin.value;

            let str_result = str_origin.replace("\\u0003","<")
            //已经替换了,<br>是显示不出来的.
            // oResult.innerHTML = str_result;
            oResult.innerText = str_result;
        }
        function replaceAll() {
            let oResult = document.getElementById("result2");
            let oOrigin = document.getElementById("origin");
            console.log(oOrigin)
            let str_origin = oOrigin.value;

            let str_result = str_origin.replace(/\\u0003/g,"<")

            oResult.innerText = str_result;
        }
    </script>
    <body>
        <div id="app">
        <div><input id="origin" value="\u0003br>\u0003br>\u0003br>\u0003br"></input></div>
        <div> <button onclick="replaceOne()">replace替换一次</button></div>
        <div>  <button onclick="replaceAll()">replace正则替换</button></div>
        <div id="result1"></div>
        <div id="result2"></div>
        </div>
    </body>
</html>